SocketClient

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val errors: Flow<SocketError>

Aggregate error stream across the engine and all namespaces on this client. Prefer NamespaceSocket.errors when filtering by namespace.

Functions

Link copied to clipboard
fun close()

Non-blocking release from the multiplex registry. The engine may still be tearing down on a background worker after this returns; use closeAwait when teardown must finish first.

Link copied to clipboard
suspend fun closeAwait()

Suspends until registry release and engine destruction complete on the worker queue.

Link copied to clipboard
suspend fun emitAwait(path: String = "/", command: StreamCommand)

Same queue semantics as emitAwait for a StreamCommand on path.

suspend fun emitAwait(path: String = "/", event: String, vararg payloads: Any?)

Suspends until the event is accepted into the outbound queue for path. See NamespaceSocket.emitAwait for queue vs async SocketError.SendFailed semantics.

Link copied to clipboard

Reflects aggregate connection state across all namespaces on this client.

Link copied to clipboard

Reflects aggregate connection state across all namespaces on this client.

Link copied to clipboard
fun namespace(path: String = "/"): NamespaceSocket
Link copied to clipboard
suspend fun openAwait(path: String = "/")
Link copied to clipboard

Stops automatic reconnect scheduling (cancels any pending backoff timer).

Link copied to clipboard

Re-enables automatic reconnect scheduling and opens the engine immediately when namespaces still want a connection and the engine is closed.